<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/jspgou_sys/head.html"/>
<script type="text/javascript">
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	if(!confirm("<@s.m 'global.confirm.delete'/>")) {
		return;
	}
	var f = document.getElementById('tableForm');
	f.action="o_delete.do";
	f.submit();
}



function getTableForm() {
	return document.getElementById('tableForm');
}
</script>
</head>
<body>
<div class="body-box">
<div class="rhead">
	<div class="rpos"><@s.m "global.position"/>: <@s.m "customer.consult"/> - <@s.m "global.list"/></div>
	<!-- 
	<form class="ropt">
		<input type="submit" value="<@s.m "global.add"/>" onclick="this.form.action='v_add.do';"/>
	</form>
	 -->
	<div class="clear"></div>
</div>
<div class="rhead">
	<form action="v_list.do" id="queryform">
	<@s.m "consult.people"/>： 
	    <input type="text" name="userName" value="${userName!}" style="width:100px"/>
	<@s.m "consult.product"/>：
	     <input type="text" name="productName" value="${productName!}" style="width:100px"/>
	<@s.m "consult.date"/>：
	    <input type="text" name="startTime" id="startTime" value="${startTime!}" class="Wdate" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')}',dateFmt:'yyyy-MM-dd'})"/>
	    &nbsp;至&nbsp;<input type="text" name="endTime" id="endTime" value="${endTime!}" class="Wdate" onclick="WdatePicker({minDate:'#F{$dp.$D(\'startTime\')}',dateFmt:'yyyy-MM-dd'})"/>
		<input type="submit" class="ropt" value="<@s.m "global.query"/>" />
	</form>
	<div class="clear"></div>
</div>
<form id="tableForm" method="post">
	<input type="hidden" name="pageNo" value="${pageNo!}"/>
	<@p.table listAction="v_list.do" value=pagination;consult,i,has_next><#rt/>
		<@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
			 <input type='checkbox' name='ids' value='${consult.id}'/><#t/>
		</@p.column><#t/>
		<@p.column title="ID">${consult.id}</@p.column><#t/>
		<@p.column code="consult.people">${consult.member.username}</@p.column><#t/>
		<@p.column code="consult.product">${consult.product.name}</@p.column><#t/>
		<@p.column code="咨询类型">
		
		<#list consultTypes as c>
		    <#if c.value='${consult.consultType}'>
		       ${c.name}
		    </#if>
		</#list>
		
		</@p.column><#t/>
		<@p.column code="consult.date">${consult.consultTime}</@p.column><#t/>
		
		
		
		<@p.column code="global.operate" align="center">
			<a href="v_edit.do?id=${consult.id}&pageNo=${pageNo!}"><@s.m "admin.view"/>/<@s.m "admin.reply"/></a> | <#rt/>
			<a href="o_delete.do?ids=${consult.id}&pageNo=${pageNo!}" onclick="if(!confirm('<@s.m "global.confirm.delete"/>')) {return false;}"><@s.m "global.delete"/></a><#t/>
		</@p.column><#t/>
	</@p.table>
	<div><input type="button" value="<@s.m "global.delete"/>" onclick="optDelete();"/></div>
</form>
</div>
<#include "/common/alert_message.html"/>
</body>
</html>